/**
 *
 */
import Util;
import OpenApi;

import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  

  checkConfig(config);
  @endpoint = getEndpoint('ddospro', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model ConfigSwitchPriorityRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  config?: [ 
    {
      ip?: string(name='Ip'),
      priority?: int32(name='Priority'),
    }
  ](name='Config'),
}

model ConfigSwitchPriorityResponseBody = {
  requestId?: string(name='RequestId'),
}

model ConfigSwitchPriorityResponse = {
  headers: map[string]string(name='headers'),
  body: ConfigSwitchPriorityResponseBody(name='body'),
}

async function configSwitchPriorityWithOptions(request: ConfigSwitchPriorityRequest, runtime: Util.RuntimeOptions): ConfigSwitchPriorityResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ConfigSwitchPriority', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function configSwitchPriority(request: ConfigSwitchPriorityRequest): ConfigSwitchPriorityResponse {
  var runtime = new Util.RuntimeOptions{};
  return configSwitchPriorityWithOptions(request, runtime);
}

model CreateCcCustomedRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  matchingRule?: string(name='MatchingRule'),
  domain?: string(name='Domain'),
  visitCount?: int32(name='VisitCount'),
  name?: string(name='Name'),
  blockingType?: string(name='BlockingType'),
  interval?: int32(name='Interval'),
  blockingTime?: int32(name='BlockingTime'),
  uri?: string(name='Uri'),
}

model CreateCcCustomedRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateCcCustomedRuleResponse = {
  headers: map[string]string(name='headers'),
  body: CreateCcCustomedRuleResponseBody(name='body'),
}

async function createCcCustomedRuleWithOptions(request: CreateCcCustomedRuleRequest, runtime: Util.RuntimeOptions): CreateCcCustomedRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateCcCustomedRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createCcCustomedRule(request: CreateCcCustomedRuleRequest): CreateCcCustomedRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCcCustomedRuleWithOptions(request, runtime);
}

model CreateDomainRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  ip?: string(name='Ip'),
  type?: string(name='Type'),
  ccEnable?: boolean(name='CcEnable'),
  realServer?: [ string ](name='RealServer'),
  proxyType?: [ string ](name='ProxyType'),
  ips?: [ string ](name='Ips'),
}

model CreateDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateDomainResponse = {
  headers: map[string]string(name='headers'),
  body: CreateDomainResponseBody(name='body'),
}

async function createDomainWithOptions(request: CreateDomainRequest, runtime: Util.RuntimeOptions): CreateDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateDomain', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createDomain(request: CreateDomainRequest): CreateDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDomainWithOptions(request, runtime);
}

model CreatePortRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  frontPort?: int32(name='FrontPort'),
  backPort?: int32(name='BackPort'),
  proxyType?: string(name='ProxyType'),
  realServerList?: string(name='RealServerList'),
  ip?: string(name='Ip'),
}

model CreatePortRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreatePortRuleResponse = {
  headers: map[string]string(name='headers'),
  body: CreatePortRuleResponseBody(name='body'),
}

async function createPortRuleWithOptions(request: CreatePortRuleRequest, runtime: Util.RuntimeOptions): CreatePortRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreatePortRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createPortRule(request: CreatePortRuleRequest): CreatePortRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPortRuleWithOptions(request, runtime);
}

model CreateTransmitLineRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  type?: string(name='Type'),
  domain?: string(name='Domain'),
  ips?: [ string ](name='Ips'),
  realServers?: [ string ](name='RealServers'),
}

model CreateTransmitLineResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateTransmitLineResponse = {
  headers: map[string]string(name='headers'),
  body: CreateTransmitLineResponseBody(name='body'),
}

async function createTransmitLineWithOptions(request: CreateTransmitLineRequest, runtime: Util.RuntimeOptions): CreateTransmitLineResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateTransmitLine', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createTransmitLine(request: CreateTransmitLineRequest): CreateTransmitLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTransmitLineWithOptions(request, runtime);
}

model DeleteCcCustomedRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  name?: string(name='Name'),
}

model DeleteCcCustomedRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteCcCustomedRuleResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteCcCustomedRuleResponseBody(name='body'),
}

async function deleteCcCustomedRuleWithOptions(request: DeleteCcCustomedRuleRequest, runtime: Util.RuntimeOptions): DeleteCcCustomedRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteCcCustomedRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteCcCustomedRule(request: DeleteCcCustomedRuleRequest): DeleteCcCustomedRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCcCustomedRuleWithOptions(request, runtime);
}

model DeleteDomainRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
}

model DeleteDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteDomainResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteDomainResponseBody(name='body'),
}

async function deleteDomainWithOptions(request: DeleteDomainRequest, runtime: Util.RuntimeOptions): DeleteDomainResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteDomain', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteDomain(request: DeleteDomainRequest): DeleteDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDomainWithOptions(request, runtime);
}

model DeletePortRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  frontPort?: int32(name='FrontPort'),
  ip?: string(name='Ip'),
}

model DeletePortRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeletePortRuleResponse = {
  headers: map[string]string(name='headers'),
  body: DeletePortRuleResponseBody(name='body'),
}

async function deletePortRuleWithOptions(request: DeletePortRuleRequest, runtime: Util.RuntimeOptions): DeletePortRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeletePortRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deletePortRule(request: DeletePortRuleRequest): DeletePortRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePortRuleWithOptions(request, runtime);
}

model DeleteTransmitLineRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  line?: string(name='Line'),
  domain?: string(name='Domain'),
}

model DeleteTransmitLineResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteTransmitLineResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteTransmitLineResponseBody(name='body'),
}

async function deleteTransmitLineWithOptions(request: DeleteTransmitLineRequest, runtime: Util.RuntimeOptions): DeleteTransmitLineResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteTransmitLine', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteTransmitLine(request: DeleteTransmitLineRequest): DeleteTransmitLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTransmitLineWithOptions(request, runtime);
}

model DescribeBackSourceCidrRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  line?: string(name='Line'),
  region?: string(name='Region'),
}

model DescribeBackSourceCidrResponseBody = {
  requestId?: string(name='RequestId'),
  cidrList?: {
    cidr?: [ string ](name='Cidr')
  }(name='CidrList'),
}

model DescribeBackSourceCidrResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeBackSourceCidrResponseBody(name='body'),
}

async function describeBackSourceCidrWithOptions(request: DescribeBackSourceCidrRequest, runtime: Util.RuntimeOptions): DescribeBackSourceCidrResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeBackSourceCidr', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeBackSourceCidr(request: DescribeBackSourceCidrRequest): DescribeBackSourceCidrResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackSourceCidrWithOptions(request, runtime);
}

model DescribeBizFlowRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
}

model DescribeBizFlowResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    inKbps?: [ string ](name='InKbps'),
    outKbps?: [ string ](name='OutKbps'),
    timeScope?: {
      startTime?: long(name='StartTime'),
      interval?: int32(name='Interval'),
    }(name='TimeScope'),
  }(name='Data'),
}

model DescribeBizFlowResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeBizFlowResponseBody(name='body'),
}

async function describeBizFlowWithOptions(request: DescribeBizFlowRequest, runtime: Util.RuntimeOptions): DescribeBizFlowResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeBizFlow', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeBizFlow(request: DescribeBizFlowRequest): DescribeBizFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBizFlowWithOptions(request, runtime);
}

model DescribeCcEventsRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  startTime?: long(name='StartTime'),
  domain?: string(name='Domain'),
  endTime?: long(name='EndTime'),
  pageSize?: int32(name='PageSize'),
  pageNo?: int32(name='PageNo'),
}

model DescribeCcEventsResponseBody = {
  requestId?: string(name='RequestId'),
  eventList?: [ 
    {
      endTime?: string(name='EndTime'),
      startTime?: string(name='StartTime'),
      domain?: string(name='Domain'),
      attackFinished?: boolean(name='AttackFinished'),
      maxQps?: int32(name='MaxQps'),
      duration?: int32(name='Duration'),
      blockedCount?: int32(name='BlockedCount'),
    }
  ](name='EventList'),
  total?: int32(name='Total'),
}

model DescribeCcEventsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCcEventsResponseBody(name='body'),
}

async function describeCcEventsWithOptions(request: DescribeCcEventsRequest, runtime: Util.RuntimeOptions): DescribeCcEventsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCcEvents', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCcEvents(request: DescribeCcEventsRequest): DescribeCcEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCcEventsWithOptions(request, runtime);
}

model DescribeCnameAutoStatusRequest {
  resourceOwnerId?: long(name='ResourceOwnerId'),
  domain?: string(name='Domain'),
}

model DescribeCnameAutoStatusResponseBody = {
  status?: boolean(name='Status'),
  requestId?: string(name='RequestId'),
}

model DescribeCnameAutoStatusResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCnameAutoStatusResponseBody(name='body'),
}

async function describeCnameAutoStatusWithOptions(request: DescribeCnameAutoStatusRequest, runtime: Util.RuntimeOptions): DescribeCnameAutoStatusResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCnameAutoStatus', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCnameAutoStatus(request: DescribeCnameAutoStatusRequest): DescribeCnameAutoStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCnameAutoStatusWithOptions(request, runtime);
}

model DescribeDdosAttackEventsRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  pageSize?: int32(name='PageSize'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
  currentPage?: int32(name='CurrentPage'),
}

model DescribeDdosAttackEventsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    eventList?: [ 
      {
        endTime?: long(name='EndTime'),
        startTime?: long(name='StartTime'),
        attackType?: string(name='AttackType'),
        result?: int32(name='Result'),
        duration?: string(name='Duration'),
      }
    ](name='EventList'),
    totalCount?: int32(name='TotalCount'),
  }(name='Data'),
}

model DescribeDdosAttackEventsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosAttackEventsResponseBody(name='body'),
}

async function describeDdosAttackEventsWithOptions(request: DescribeDdosAttackEventsRequest, runtime: Util.RuntimeOptions): DescribeDdosAttackEventsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosAttackEvents', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosAttackEvents(request: DescribeDdosAttackEventsRequest): DescribeDdosAttackEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosAttackEventsWithOptions(request, runtime);
}

model DescribeDdosAttackEventSourceIpsRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  pageSize?: int32(name='PageSize'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
  currentPage?: int32(name='CurrentPage'),
}

model DescribeDdosAttackEventSourceIpsResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    ipList?: [ 
      {
        sourceIp?: string(name='SourceIp'),
        inBps?: int32(name='InBps'),
        city?: string(name='City'),
      }
    ](name='IpList'),
    totalCount?: int32(name='TotalCount'),
  }(name='Data'),
}

model DescribeDdosAttackEventSourceIpsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosAttackEventSourceIpsResponseBody(name='body'),
}

async function describeDdosAttackEventSourceIpsWithOptions(request: DescribeDdosAttackEventSourceIpsRequest, runtime: Util.RuntimeOptions): DescribeDdosAttackEventSourceIpsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosAttackEventSourceIps', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosAttackEventSourceIps(request: DescribeDdosAttackEventSourceIpsRequest): DescribeDdosAttackEventSourceIpsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosAttackEventSourceIpsWithOptions(request, runtime);
}

model DescribeDdosAttackTypeChartRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
}

model DescribeDdosAttackTypeChartResponseBody = {
  attckCount?: int32(name='AttckCount'),
  requestId?: string(name='RequestId'),
  attckType?: string(name='AttckType'),
  dropCount?: int32(name='DropCount'),
  dropType?: string(name='DropType'),
}

model DescribeDdosAttackTypeChartResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosAttackTypeChartResponseBody(name='body'),
}

async function describeDdosAttackTypeChartWithOptions(request: DescribeDdosAttackTypeChartRequest, runtime: Util.RuntimeOptions): DescribeDdosAttackTypeChartResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosAttackTypeChart', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosAttackTypeChart(request: DescribeDdosAttackTypeChartRequest): DescribeDdosAttackTypeChartResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosAttackTypeChartWithOptions(request, runtime);
}

model DescribeDdosFlowProportionDiagramRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
}

model DescribeDdosFlowProportionDiagramResponseBody = {
  totalBps?: int32(name='TotalBps'),
  requestId?: string(name='RequestId'),
  dropPps?: int32(name='DropPps'),
  dropBps?: int32(name='DropBps'),
  totalPps?: int32(name='TotalPps'),
}

model DescribeDdosFlowProportionDiagramResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosFlowProportionDiagramResponseBody(name='body'),
}

async function describeDdosFlowProportionDiagramWithOptions(request: DescribeDdosFlowProportionDiagramRequest, runtime: Util.RuntimeOptions): DescribeDdosFlowProportionDiagramResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosFlowProportionDiagram', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosFlowProportionDiagram(request: DescribeDdosFlowProportionDiagramRequest): DescribeDdosFlowProportionDiagramResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosFlowProportionDiagramWithOptions(request, runtime);
}

model DescribeDdosIpConfigRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  index?: int32(name='Index'),
  pageSize?: int32(name='PageSize'),
  ips?: [ string ](name='Ips'),
}

model DescribeDdosIpConfigResponseBody = {
  dataList?: [ 
    {
      status?: int32(name='Status'),
      cleanStatus?: int32(name='CleanStatus'),
      bandwidth?: int32(name='Bandwidth'),
      configDomainCount?: int32(name='ConfigDomainCount'),
      line?: string(name='Line'),
      elasticBandwidth?: int32(name='ElasticBandwidth'),
      lbId?: string(name='LbId'),
      configPortCount?: int32(name='ConfigPortCount'),
      ip?: string(name='Ip'),
      totalDefenseCount?: int32(name='TotalDefenseCount'),
    }
  ](name='DataList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeDdosIpConfigResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosIpConfigResponseBody(name='body'),
}

async function describeDdosIpConfigWithOptions(request: DescribeDdosIpConfigRequest, runtime: Util.RuntimeOptions): DescribeDdosIpConfigResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosIpConfig', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosIpConfig(request: DescribeDdosIpConfigRequest): DescribeDdosIpConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosIpConfigWithOptions(request, runtime);
}

model DescribeDdosPeakFlowRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  ip?: string(name='Ip'),
}

model DescribeDdosPeakFlowResponseBody = {
  peakFlow?: string(name='PeakFlow'),
  requestId?: string(name='RequestId'),
}

model DescribeDdosPeakFlowResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDdosPeakFlowResponseBody(name='body'),
}

async function describeDdosPeakFlowWithOptions(request: DescribeDdosPeakFlowRequest, runtime: Util.RuntimeOptions): DescribeDdosPeakFlowResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDdosPeakFlow', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDdosPeakFlow(request: DescribeDdosPeakFlowRequest): DescribeDdosPeakFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDdosPeakFlowWithOptions(request, runtime);
}

model DescribeDomainConfigPageRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  pageSize?: int32(name='PageSize'),
  pageNo?: int32(name='PageNo'),
}

model DescribeDomainConfigPageResponseBody = {
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
  configList?: [ 
    {
      domain?: string(name='Domain'),
      cname?: string(name='Cname'),
      instances?: [ 
        {
          instanceRemark?: string(name='InstanceRemark'),
          instanceId?: string(name='InstanceId'),
          rules?: [ 
            {
              proxyTypeList?: [ string ](name='ProxyTypeList'),
              line?: string(name='Line'),
              realServers?: [ string ](name='RealServers'),
              ip?: string(name='Ip'),
            }
          ](name='Rules'),
        }
      ](name='Instances'),
    }
  ](name='ConfigList'),
}

model DescribeDomainConfigPageResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDomainConfigPageResponseBody(name='body'),
}

async function describeDomainConfigPageWithOptions(request: DescribeDomainConfigPageRequest, runtime: Util.RuntimeOptions): DescribeDomainConfigPageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDomainConfigPage', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDomainConfigPage(request: DescribeDomainConfigPageRequest): DescribeDomainConfigPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainConfigPageWithOptions(request, runtime);
}

model DescribeDomainSecurityConfigRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
}

model DescribeDomainSecurityConfigResponseBody = {
  requestId?: string(name='RequestId'),
  ccInfo?: {
    ccCustomRuleCount?: int32(name='CcCustomRuleCount'),
    ccSwitch?: boolean(name='CcSwitch'),
    ccTemplate?: string(name='CcTemplate'),
    ccCustomRuleEnable?: boolean(name='CcCustomRuleEnable'),
  }(name='CcInfo'),
  cnameEnable?: boolean(name='CnameEnable'),
  whiteList?: string(name='WhiteList'),
  blackList?: string(name='BlackList'),
  cnameMode?: int32(name='CnameMode'),
}

model DescribeDomainSecurityConfigResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDomainSecurityConfigResponseBody(name='body'),
}

async function describeDomainSecurityConfigWithOptions(request: DescribeDomainSecurityConfigRequest, runtime: Util.RuntimeOptions): DescribeDomainSecurityConfigResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDomainSecurityConfig', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDomainSecurityConfig(request: DescribeDomainSecurityConfigRequest): DescribeDomainSecurityConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainSecurityConfigWithOptions(request, runtime);
}

model DescribeHealthCheckConfigRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  ip?: string(name='Ip'),
}

model DescribeHealthCheckConfigResponseBody = {
  listeners?: [ 
    {
      frontendPort?: int32(name='FrontendPort'),
      check?: {
        type?: string(name='Type'),
        timeout?: int32(name='Timeout'),
        domain?: string(name='Domain'),
        interval?: int32(name='Interval'),
        up?: int32(name='Up'),
        down?: int32(name='Down'),
        port?: int32(name='Port'),
        uri?: string(name='Uri'),
      }(name='Check'),
      protocol?: string(name='Protocol'),
      backPort?: int32(name='BackPort'),
      config?: {
        synProxy?: string(name='SynProxy'),
        persistenceTimeout?: int32(name='PersistenceTimeout'),
        noDataConn?: string(name='NoDataConn'),
        sla?: {
          cpsEnable?: int32(name='CpsEnable'),
          cps?: int32(name='Cps'),
          maxConnEnable?: int32(name='MaxConnEnable'),
          maxConn?: int32(name='MaxConn'),
        }(name='Sla'),
        payloadLength?: {
          max?: int32(name='Max'),
          min?: int32(name='Min'),
        }(name='PayloadLength'),
        slimit?: {
          cpsEnable?: int32(name='CpsEnable'),
          cps?: int32(name='Cps'),
          maxConnEnable?: int32(name='MaxConnEnable'),
          maxConn?: int32(name='MaxConn'),
        }(name='Slimit'),
      }(name='Config'),
    }
  ](name='Listeners'),
  requestId?: string(name='RequestId'),
}

model DescribeHealthCheckConfigResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeHealthCheckConfigResponseBody(name='body'),
}

async function describeHealthCheckConfigWithOptions(request: DescribeHealthCheckConfigRequest, runtime: Util.RuntimeOptions): DescribeHealthCheckConfigResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeHealthCheckConfig', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeHealthCheckConfig(request: DescribeHealthCheckConfigRequest): DescribeHealthCheckConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHealthCheckConfigWithOptions(request, runtime);
}

model DescribeInstancePageRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  pageSize?: int32(name='PageSize'),
  currentPage?: int32(name='CurrentPage'),
  instanceId?: string(name='InstanceId'),
  line?: string(name='Line'),
  instanceIdList?: [ string ](name='InstanceIdList'),
  ipList?: [ string ](name='IpList'),
}

model DescribeInstancePageResponseBody = {
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
  instanceList?: [ 
    {
      instanceRemark?: string(name='InstanceRemark'),
      ipList?: [ 
        {
          status?: int32(name='Status'),
          line?: string(name='Line'),
          ip?: string(name='Ip'),
          instanceId?: string(name='InstanceId'),
          bandWidth?: int32(name='BandWidth'),
          elasticBandWidth?: int32(name='ElasticBandWidth'),
        }
      ](name='IpList'),
      instanceId?: string(name='InstanceId'),
    }
  ](name='InstanceList'),
}

model DescribeInstancePageResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeInstancePageResponseBody(name='body'),
}

async function describeInstancePageWithOptions(request: DescribeInstancePageRequest, runtime: Util.RuntimeOptions): DescribeInstancePageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeInstancePage', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeInstancePage(request: DescribeInstancePageRequest): DescribeInstancePageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstancePageWithOptions(request, runtime);
}

model DescribePortRulePageRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  pageSize?: int32(name='PageSize'),
  ip?: string(name='Ip'),
  currentPage?: int32(name='CurrentPage'),
}

model DescribePortRulePageResponseBody = {
  ruleList?: [ 
    {
      backProtocol?: string(name='BackProtocol'),
      backPort?: int32(name='BackPort'),
      lbId?: string(name='LbId'),
      ip?: string(name='Ip'),
      lvsType?: string(name='LvsType'),
      realServer?: string(name='RealServer'),
      frontPort?: int32(name='FrontPort'),
      frontProtocol?: string(name='FrontProtocol'),
    }
  ](name='RuleList'),
  requestId?: string(name='RequestId'),
  count?: int32(name='Count'),
}

model DescribePortRulePageResponse = {
  headers: map[string]string(name='headers'),
  body: DescribePortRulePageResponseBody(name='body'),
}

async function describePortRulePageWithOptions(request: DescribePortRulePageRequest, runtime: Util.RuntimeOptions): DescribePortRulePageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribePortRulePage', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describePortRulePage(request: DescribePortRulePageRequest): DescribePortRulePageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describePortRulePageWithOptions(request, runtime);
}

model ListCcCustomedRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  pageSize?: int32(name='PageSize'),
  currentPage?: int32(name='CurrentPage'),
}

model ListCcCustomedRuleResponseBody = {
  totalCount?: int32(name='TotalCount'),
  ruleList?: {
    rule?: [ 
    {
      blockingTime?: int32(name='BlockingTime'),
      blockingType?: string(name='BlockingType'),
      interval?: int32(name='Interval'),
      visitCount?: int32(name='VisitCount'),
      name?: string(name='Name'),
      uri?: string(name='Uri'),
      matchingRule?: string(name='MatchingRule'),
    }
  ](name='Rule')
  }(name='RuleList'),
  requestId?: string(name='RequestId'),
}

model ListCcCustomedRuleResponse = {
  headers: map[string]string(name='headers'),
  body: ListCcCustomedRuleResponseBody(name='body'),
}

async function listCcCustomedRuleWithOptions(request: ListCcCustomedRuleRequest, runtime: Util.RuntimeOptions): ListCcCustomedRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListCcCustomedRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listCcCustomedRule(request: ListCcCustomedRuleRequest): ListCcCustomedRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCcCustomedRuleWithOptions(request, runtime);
}

model ModifyCcCustomStatusRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  enable?: boolean(name='Enable'),
}

model ModifyCcCustomStatusResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyCcCustomStatusResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyCcCustomStatusResponseBody(name='body'),
}

async function modifyCcCustomStatusWithOptions(request: ModifyCcCustomStatusRequest, runtime: Util.RuntimeOptions): ModifyCcCustomStatusResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyCcCustomStatus', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyCcCustomStatus(request: ModifyCcCustomStatusRequest): ModifyCcCustomStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCcCustomStatusWithOptions(request, runtime);
}

model ModifyCcStatusRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  enable?: boolean(name='Enable'),
}

model ModifyCcStatusResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyCcStatusResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyCcStatusResponseBody(name='body'),
}

async function modifyCcStatusWithOptions(request: ModifyCcStatusRequest, runtime: Util.RuntimeOptions): ModifyCcStatusResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyCcStatus', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyCcStatus(request: ModifyCcStatusRequest): ModifyCcStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCcStatusWithOptions(request, runtime);
}

model ModifyCcTemplateRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  mode?: int32(name='Mode'),
}

model ModifyCcTemplateResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyCcTemplateResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyCcTemplateResponseBody(name='body'),
}

async function modifyCcTemplateWithOptions(request: ModifyCcTemplateRequest, runtime: Util.RuntimeOptions): ModifyCcTemplateResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyCcTemplate', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyCcTemplate(request: ModifyCcTemplateRequest): ModifyCcTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCcTemplateWithOptions(request, runtime);
}

model ModifyDDoSProtectConfigRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  ip?: string(name='Ip'),
  frontPort?: int32(name='FrontPort'),
  configJson?: string(name='ConfigJson'),
  lbId?: string(name='LbId'),
}

model ModifyDDoSProtectConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyDDoSProtectConfigResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyDDoSProtectConfigResponseBody(name='body'),
}

async function modifyDDoSProtectConfigWithOptions(request: ModifyDDoSProtectConfigRequest, runtime: Util.RuntimeOptions): ModifyDDoSProtectConfigResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyDDoSProtectConfig', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyDDoSProtectConfig(request: ModifyDDoSProtectConfigRequest): ModifyDDoSProtectConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDDoSProtectConfigWithOptions(request, runtime);
}

model ModifyDomainBlackWhiteListRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  black?: [ string ](name='Black'),
  white?: [ string ](name='White'),
}

model ModifyDomainBlackWhiteListResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyDomainBlackWhiteListResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyDomainBlackWhiteListResponseBody(name='body'),
}

async function modifyDomainBlackWhiteListWithOptions(request: ModifyDomainBlackWhiteListRequest, runtime: Util.RuntimeOptions): ModifyDomainBlackWhiteListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyDomainBlackWhiteList', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyDomainBlackWhiteList(request: ModifyDomainBlackWhiteListRequest): ModifyDomainBlackWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDomainBlackWhiteListWithOptions(request, runtime);
}

model ModifyDomainProxyRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  proxyType?: [ string ](name='ProxyType'),
}

model ModifyDomainProxyResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyDomainProxyResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyDomainProxyResponseBody(name='body'),
}

async function modifyDomainProxyWithOptions(request: ModifyDomainProxyRequest, runtime: Util.RuntimeOptions): ModifyDomainProxyResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyDomainProxy', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyDomainProxy(request: ModifyDomainProxyRequest): ModifyDomainProxyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDomainProxyWithOptions(request, runtime);
}

model ModifyElasticBandwidthRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  elasticBandwidth?: int32(name='ElasticBandwidth'),
  ip?: string(name='Ip'),
}

model ModifyElasticBandwidthResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyElasticBandwidthResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyElasticBandwidthResponseBody(name='body'),
}

async function modifyElasticBandwidthWithOptions(request: ModifyElasticBandwidthRequest, runtime: Util.RuntimeOptions): ModifyElasticBandwidthResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyElasticBandwidth', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyElasticBandwidth(request: ModifyElasticBandwidthRequest): ModifyElasticBandwidthResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyElasticBandwidthWithOptions(request, runtime);
}

model ModifyHealthCheckConfigRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  ip?: string(name='Ip'),
  frontPort?: int32(name='FrontPort'),
  configJson?: string(name='ConfigJson'),
  lbId?: string(name='LbId'),
}

model ModifyHealthCheckConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyHealthCheckConfigResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyHealthCheckConfigResponseBody(name='body'),
}

async function modifyHealthCheckConfigWithOptions(request: ModifyHealthCheckConfigRequest, runtime: Util.RuntimeOptions): ModifyHealthCheckConfigResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyHealthCheckConfig', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyHealthCheckConfig(request: ModifyHealthCheckConfigRequest): ModifyHealthCheckConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyHealthCheckConfigWithOptions(request, runtime);
}

model ModifyIpCnameStatusRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  ip?: string(name='Ip'),
  enable?: boolean(name='Enable'),
}

model ModifyIpCnameStatusResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyIpCnameStatusResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyIpCnameStatusResponseBody(name='body'),
}

async function modifyIpCnameStatusWithOptions(request: ModifyIpCnameStatusRequest, runtime: Util.RuntimeOptions): ModifyIpCnameStatusResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyIpCnameStatus', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyIpCnameStatus(request: ModifyIpCnameStatusRequest): ModifyIpCnameStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyIpCnameStatusWithOptions(request, runtime);
}

model ModifyPersistenceTimeOutRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  ip?: string(name='Ip'),
  frontPort?: int32(name='FrontPort'),
  configJson?: string(name='ConfigJson'),
  lbId?: string(name='LbId'),
}

model ModifyPersistenceTimeOutResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyPersistenceTimeOutResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyPersistenceTimeOutResponseBody(name='body'),
}

async function modifyPersistenceTimeOutWithOptions(request: ModifyPersistenceTimeOutRequest, runtime: Util.RuntimeOptions): ModifyPersistenceTimeOutResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyPersistenceTimeOut', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyPersistenceTimeOut(request: ModifyPersistenceTimeOutRequest): ModifyPersistenceTimeOutResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyPersistenceTimeOutWithOptions(request, runtime);
}

model ModifyRealServersRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  type?: string(name='Type'),
  domain?: string(name='Domain'),
  line?: string(name='Line'),
  realServers?: [ string ](name='RealServers'),
}

model ModifyRealServersResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyRealServersResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyRealServersResponseBody(name='body'),
}

async function modifyRealServersWithOptions(request: ModifyRealServersRequest, runtime: Util.RuntimeOptions): ModifyRealServersResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyRealServers', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyRealServers(request: ModifyRealServersRequest): ModifyRealServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRealServersWithOptions(request, runtime);
}

model ModifyTransmitLineRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  domain?: string(name='Domain'),
  ips?: [ string ](name='Ips'),
}

model ModifyTransmitLineResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyTransmitLineResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyTransmitLineResponseBody(name='body'),
}

async function modifyTransmitLineWithOptions(request: ModifyTransmitLineRequest, runtime: Util.RuntimeOptions): ModifyTransmitLineResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ModifyTransmitLine', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function modifyTransmitLine(request: ModifyTransmitLineRequest): ModifyTransmitLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyTransmitLineWithOptions(request, runtime);
}

model UpdateCcCustomedRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  matchingRule?: string(name='MatchingRule'),
  domain?: string(name='Domain'),
  visitCount?: int32(name='VisitCount'),
  name?: string(name='Name'),
  blockingType?: string(name='BlockingType'),
  interval?: int32(name='Interval'),
  blockingTime?: int32(name='BlockingTime'),
  uri?: string(name='Uri'),
}

model UpdateCcCustomedRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateCcCustomedRuleResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateCcCustomedRuleResponseBody(name='body'),
}

async function updateCcCustomedRuleWithOptions(request: UpdateCcCustomedRuleRequest, runtime: Util.RuntimeOptions): UpdateCcCustomedRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateCcCustomedRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateCcCustomedRule(request: UpdateCcCustomedRuleRequest): UpdateCcCustomedRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCcCustomedRuleWithOptions(request, runtime);
}

model UpdatePortRuleRequest {
  sourceIp?: string(name='SourceIp'),
  lang?: string(name='Lang'),
  frontPort?: int32(name='FrontPort'),
  realServerList?: string(name='RealServerList'),
  ip?: string(name='Ip'),
}

model UpdatePortRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdatePortRuleResponse = {
  headers: map[string]string(name='headers'),
  body: UpdatePortRuleResponseBody(name='body'),
}

async function updatePortRuleWithOptions(request: UpdatePortRuleRequest, runtime: Util.RuntimeOptions): UpdatePortRuleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdatePortRule', '2017-07-25', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updatePortRule(request: UpdatePortRuleRequest): UpdatePortRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePortRuleWithOptions(request, runtime);
}

